package zhr.chapter4.example1;

public class Hammer {
    private String type;
    public Hammer(){

    }
    public Hammer(String type){
    this.type=type;
    }
    public String getType(){
        return type;
    }
    public void hit(Nail nail){
        System.out.println(this.type+"敲击一个"+nail.getLength()+"厘米的钉子");
    }
}
